using System.Collections;
using System.Collections.Generic;

namespace Magiq.Databases
{
    public class SelectStatementInformation : IEnumerable<string>
    {
        private readonly IList<string> selectedValues;

        public SelectStatementInformation(string from, IList<string> selectedValues)
        {
            From = from;
            this.selectedValues = selectedValues;
        }

        public string From { get; private set; }

        public string this[int index]
        {
            get { return selectedValues[index]; }
        }

        public int Length
        {
            get { return selectedValues.Count; }
        }

        #region IEnumerable<string> Members

        public IEnumerator<string> GetEnumerator()
        {
            return selectedValues.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        #endregion
    }
}